package cn.mumzone.pos.presenter;

import android.util.Log;

import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.List;

import cn.mumzone.basic.mvp.AbsPresenter;
import cn.mumzone.basic.net.http.callback.ApiCallBack;
import cn.mumzone.basic.net.response.BaseResponse;
import cn.mumzone.basic.util.BigDecimalUtil;
import cn.mumzone.basic.util.StringUtils;
import cn.mumzone.pos.model.BillConsumeDetailsEntity;
import cn.mumzone.pos.model.BillDetailEntity;
import cn.mumzone.pos.model.SettleItemEntity;
import cn.mumzone.pos.model.source.BillsRepository;
import cn.mumzone.pos.presenter.contract.BillReturnContract;
import cn.mumzone.pos.ui.fragment.bills.FRA_BillItem;
import cn.mumzone.pos.util.BillUtil;

/**
 * Created by JoeLjt on 2019/7/9.
 * Email: lijiateng1219@gmail.com
 * Description:
 */

public class BillReturnPresenter extends AbsPresenter<BillReturnContract.View, BillsRepository> {

    public void getGoodsBillInfo(String saleId) {
        ApiCallBack<BillDetailEntity> callBack = new ApiCallBack<BillDetailEntity>() {
            @Override
            public void onSuccess(BillDetailEntity billGoodsList) {
//                mView.showBillReturnList(billGoodsList.getGoodsList());
            }

            @Override
            public void onError(BaseResponse response) {
                mView.showError(response.getMsg());
            }
        };
        mRepo.getBillDetail(saleId, StringUtils.get(FRA_BillItem.GOODS), callBack);
        addSubscrebe(callBack);
    }

}
